package com.woniu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.entity.PageData;
import com.woniu.entity.dto.FundFlowDTO;
import com.woniu.entity.vo.UserOrderNoPayDetailsVO;
import com.woniu.entity.vo.UserOrderPayDetailsVO;
import com.woniu.entity.vo.UserOrderVO;
import com.woniu.entity.PageData;
import com.woniu.entity.dto.CreateOrderDTO;
import com.woniu.entity.dto.QueryOrderDTO;
import com.woniu.entity.vo.DetailOrderVO;
import com.woniu.entity.vo.ListOrderVO;
import com.woniu.entity.PageData;
import com.woniu.entity.dto.CreateOrderDTO;
import com.woniu.entity.dto.QueryOrderDTO;
import com.woniu.entity.vo.DetailOrderVO;
import com.woniu.entity.vo.ListOrderVO;
import com.woniu.pojo.Order;

import java.util.List;

/**
* @author Ma.Lei
* @description 针对表【t_order】的数据库操作Service
* @createDate 2022-12-16 23:28:04
*/
public interface OrderService extends IService<Order> {

    PageData queryFundFlow(Integer currentPage, Integer pageSize, FundFlowDTO fundFlowDTO);
    List<UserOrderVO> listOrder(String id, String status);

    UserOrderVO orderOngoingDetails(String orderCode);

    UserOrderNoPayDetailsVO orderNoPayOrFinishDetails(String orderCode);

    UserOrderPayDetailsVO orderPayDetails(String orderCode);

    Order selectByOrderCode(String orderCode);

    List<UserOrderVO> listOrderByCarNum(String id,String carNum);

    List<Order>  checkCarNum(String carNum);
    Order getByOrderCode(String out_trade_no);

    /**
     * 创建订单
     * @param createOrderDTO 相关用户车辆泊位巡检员信息
     */
    Boolean createOrder(CreateOrderDTO createOrderDTO);

    /**
     * 修改订单至待支付
     * @param id
     * @return
     */
    int updateOrderToPay(String id);

    /**
     * 条件搜索
     * @param queryOrderDTO
     * @return
     */
    PageData listSearch(Integer currentPage, Integer pageSize, QueryOrderDTO queryOrderDTO);

    /**
     * 导出订单数据
     * @param queryOrderDTO
     * @return
     */
    List<ListOrderVO> exportByDTO(QueryOrderDTO queryOrderDTO);

    /**
     * 根据订单ID查询数据
     * @param id
     * @return
     */
    DetailOrderVO getDetailById(String id);
}
